Skip to content

feat: add support for POSTGRES_SSLMODE environment variable#2517

Open
its-abhaykumar wants to merge 4 commits intonextcloud:masterfrom
its-abhaykumar:master
Open

feat: add support for POSTGRES_SSLMODE environment variable#2517
its-abhaykumar wants to merge 4 commits intonextcloud:masterfrom
its-abhaykumar:master

Conversation

@its-abhaykumar
Copy link

Summary

This PR adds support for the POSTGRES_SSLMODE environment variable in the entrypoint script. This allows users to configure SSL modes (e.g., require, verify-full) when using a PostgreSQL database.

Details

  • Added file_env 'POSTGRES_SSLMODE' to support Docker secrets.
  • Added logic to set dbdriveroptions key 1000 (PDO::PGSQL_ATTR_SSL_MODE) via occ.
  • Fixed legacy ENV syntax warnings in the Dockerfile.

Testing

Verified in a local container environment. The logs confirm the configuration block is triggered during initialization:
Setting Postgres SSL Mode...

Fixes #2477

Signed-off-by: Abhay Kumar <163823435+its-abhaykumar@users.noreply.github.com>
Signed-off-by: Abhay Kumar <163823435+its-abhaykumar@users.noreply.github.com>
Add support for PostgreSQL SSL mode and CA options in entrypoint script.

Signed-off-by: Abhay Kumar <163823435+its-abhaykumar@users.noreply.github.com>
Signed-off-by: Abhay Kumar <163823435+its-abhaykumar@users.noreply.github.com>
@J0WI
Copy link
Contributor

J0WI commented Feb 25, 2026

There are already hooks for such customisations: https://github.com/nextcloud/docker?tab=readme-ov-file#auto-configuration-via-hook-folders

The maintenance:install does unfortunately not support this option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add dynamic config for Postgres SSL mode

2 participants